package org.sunrise.game.center.client;

import java.util.HashMap;
import java.util.Map;

public class ReportClientManager {
    private static final Map<String, ReportClient> reportClients = new HashMap<>();

    public static ReportClient createReportClient(String nodeId, int type) {
        var reportClient = new ReportClient(nodeId, type);
        reportClients.put(nodeId, reportClient);
        return reportClient;
    }

    public static ReportClient createReportClient(String nodeId, int type, int serverId, String ip, int port) {
        var reportClient = new ReportClient(nodeId, type, serverId, ip, port);
        reportClients.put(nodeId, reportClient);
        return reportClient;
    }

    public static ReportClient getReportClient(String nodeId) {
        return reportClients.get(nodeId);
    }
}
